package com.atguigu.gmall.order;

import com.atguigu.gmall.common.config.pool.annotation.EnableAppThreadPool;
import com.atguigu.gmall.common.exception.EnableAutoExceptionHandle;
import com.atguigu.gmall.common.interceptors.annotation.EnableUserAuthFeignInterceptor;
import com.atguigu.gmall.feign.ware.fallback.WareFeignClientFallBack;
import com.atguigu.gmall.util.annotation.EnableMallRabbit;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Import;

/**
 * @author lfy
 * @Description
 * @create 2022-10-18 14:48
 *
 * RabbitTemplate：收发消息
 * AmpqAdmin: 对MQ资源（队列、交换机）进行CRUD
 */
@EnableMallRabbit
@Import(WareFeignClientFallBack.class)
@EnableAppThreadPool
@EnableUserAuthFeignInterceptor
@EnableFeignClients(basePackages = {
        "com.atguigu.gmall.feign.cart",
        "com.atguigu.gmall.feign.user",
        "com.atguigu.gmall.feign.product",
        "com.atguigu.gmall.feign.ware"
})
@EnableAutoExceptionHandle
@MapperScan(basePackages = "com.atguigu.gmall.order.mapper")
@SpringCloudApplication
public class OrderMainApplication {

    public static void main(String[] args) {
        SpringApplication.run(OrderMainApplication.class,args);
    }
}
